//
//  ByHomeEventView.m
//  caipiao_ios
//
//  Created by mc on 2018/7/7.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByHomeEventView.h"

@implementation ByHomeEventView

- (id)init{
   self =  [super init];
    if (self) {
        UIImageView *iconView = [[UIImageView alloc] init];
        [self addSubview:iconView];
        [iconView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(20);
            make.centerX.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(40, 40));
        }];
        iconView.layer.cornerRadius = 20;
        iconView.layer.masksToBounds = YES;
        iconView.image = [UIImage imageNamed:@"yonghutouxinag"];
        
        
        UILabel *nameLabel = [[UILabel alloc] init];
        [self addSubview:nameLabel];
        [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(iconView.mas_bottom).offset(5);
            make.left.equalTo(self).offset(0);
            make.right.equalTo(self).offset(0);
            make.height.mas_equalTo(@15);
        }];
        nameLabel.textColor = BY_TEXT_COLOR;
        nameLabel.textAlignment = NSTextAlignmentCenter;
        nameLabel.font = FONT(14);
        nameLabel.text = @"队伍名称";
        
        
        UILabel *noteLabel = [[UILabel alloc] init];
        [self addSubview:noteLabel];
        [noteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(nameLabel.mas_bottom).offset(5);
            make.left.equalTo(self).offset(0);
            make.right.equalTo(self).offset(0);
            make.height.mas_equalTo(@15);
        }];
        noteLabel.textColor = BY_TEXT_COLOR;
        noteLabel.textAlignment = NSTextAlignmentCenter;
        noteLabel.font = FONT(12);
        noteLabel.text = @"主胜 1.0";
        
        
        
    }
    return self;
}

@end
